home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Classes / XText / ErrorStream.m < prev    next >
Encoding:
Text File  |  1992-04-14  |  789 b   |  35 lines

  1. /*    This file is part of the XText package (version 0.8)
  2.     Mike Dixon, April 1992
  3.     
  4.     Copyright (c) 1992 Xerox Corporation.  All rights reserved.
  5.  
  6.     Use and copying of this software and preparation of derivative works based
  7.     upon this software are permitted.  This software is made available AS IS,
  8.     and Xerox Corporation makes no warranty about the software or its
  9.     performance.
  10. */
  11.  
  12. #import "ErrorStream.h"
  13. #import <appkit/Application.h>
  14. #import <appkit/Panel.h>
  15. #import <stdio.h>
  16.  
  17. @implementation ErrorStream
  18.  
  19. static id default_error_stream = 0;
  20.  
  21. + default
  22. {
  23.     if (!default_error_stream)
  24.         default_error_stream = [[ErrorStream allocFromZone:[NXApp zone]] init];
  25.     return default_error_stream;
  26. }
  27.  
  28. - report: (const STR) msg
  29. {
  30.     NXRunAlertPanel("Error", "%s", 0, 0, 0, msg);
  31.     return self;
  32. }
  33.  
  34. @end
  35.